package com.dhecp.project.api.mapper;

import com.dhecp.core.genericDao.GenericDao;
import com.dhecp.project.api.domain.FbaBox;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * DAO
 * @author Jason
 */
public interface FbaBoxMapper extends GenericDao<FbaBox, String>  {

	/**
     * 查询实体
     * @author Jason
	 */
	List<FbaBox> findFbaBox(Map<String, Object> params);

	/**
     * 查询单个实体
     * @author Jason
	 */
	FbaBox queryFirstByGuid(@Param("guid") String guid);

	FbaBox queryFirstByCode(@Param("code") String code);

	/**
	 * 根据fba查询
	 * @author Jason
	 */
	List<FbaBox> queryFirstByShipmentId(@Param("shipmentId") String shipmentId);


	List<FbaBox> queryFirstByShipmentIdList(List<String> shipmentIdList);

	/**
	 * 新增实体
     * @author Jason
	 */
	int insertFbaBox(FbaBox entity);
	
	/**
	 * 通过guid修改实体
     * @author Jason
	 */
	int updateByGuid(FbaBox entity);



	/**
	 * 根据code 删除发货单
	 * @param fbaBox
	 * @return
	 */
	int deleteCodeShipment(FbaBox fbaBox);


	/**
	 * 根据id 删除发货单
	 * @param fbaBox
	 * @return
	 */
	int deleteGuid(FbaBox fbaBox);
}
